package com.yzkj.siot.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yzkj.siot.domain.AdminTenant;
import com.yzkj.siot.mapper.AdminTenantMapper;
import com.yzkj.siot.service.AdminTenantService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author skye
 * @since 2021-12-25
 */
@Service
public class AdminTenantServiceImpl extends ServiceImpl<AdminTenantMapper, AdminTenant> implements AdminTenantService {

    @Override
    public AdminTenant queryOneByTenantAlias(String alias) {
        QueryWrapper<AdminTenant> where = new QueryWrapper<>();
        where.lambda().eq(AdminTenant::getTenantAlias, alias);
        return getOne(where);
    }
}
